﻿<controls:ChildWindow x:Class="CARE.Views.DatabaseSocialNetworkWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Width="400" Height="300" 
           xmlns:local="clr-namespace:CARE.Resources"
           xmlns:ds="clr-namespace:CARE.Web.Services"
           xmlns:rc="clr-namespace:System.Windows.Controls;assembly=System.Windows.Ria.Controls"                      
           Title="DatabaseSocialNetworkWindow">

    <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.Resources>
            <local:Resources x:Key="res" />
        </Grid.Resources>

        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <rc:DomainDataSource x:Name="NetsDataSource" QueryName="GetNets" AutoLoad="True">
            <rc:DomainDataSource.DomainContext>
                <ds:DataProvider />
            </rc:DomainDataSource.DomainContext>
        </rc:DomainDataSource>
        
        <StackPanel Orientation="Vertical">
            <TextBlock x:Name="Description" Text="{Binding DatabaseNetworkSelector, Source={StaticResource res}}" TextWrapping="Wrap" Height="100" Width="200" HorizontalAlignment="Center" VerticalAlignment="Top">
            </TextBlock>
            <ComboBox Name="networksBox" ItemsSource="{Binding Data, ElementName=NetsDataSource, Mode=OneWay}" ></ComboBox>
            <TextBlock Name="networkDescription" Text="{Binding SelectedItem.description, ElementName=networksBox, Mode=OneWay}" TextWrapping="Wrap" Height="Auto" Width="200" HorizontalAlignment="Center" Margin="0,10,0,0">
            </TextBlock>
        </StackPanel>

        <Button x:Name="CancelButton" Content="Cancel" Click="CancelButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="1" />
        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,79,0" Grid.Row="1" />
    </Grid>
</controls:ChildWindow>